/**
 * licenses
 *
 */
package com.openjawtech.xscraper.flights.dao;

import java.util.List;
import java.util.Date;
import com.openjawtech.xscraper.flights.domain.Flight;
import com.openjawtech.xscraper.flights.domain.Airport;
/**
 * <p>hibernate dao, supply the CRUD operations for flight instance
 *
 * <p>16/02/2009
 * @author Wenbo.Sun
 */
public interface FlightDAO {

    //save a flight info instance
    public void save(Flight flight);

    //update a flight info instance
    public void update(Flight flight);

    //delete a flight info instance
    public void delete(Flight flight);

    //retrieve a flight instance by travel information
    public Flight getByTravel(Airport departure, Airport arrival, Date travelDate);

    //retrieve flight instances by travel information from start date to end date
    public List<Flight> getByTravels(Airport departure, Airport arrival, Date start, Date end);

    //check the existence of flight information
    public boolean isExisted(Airport departure, Airport arrival, Date travelDate);

    public boolean isExisted(Airport departure, Airport arrival);

}
